\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream}{}\section{dev\+:\+:net\+:\+:Tcp\+Connection\+Input\+Stream Class Reference}
\label{classdev_1_1net_1_1_tcp_connection_input_stream}\index{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}}


Tcp连接输入流  




{\ttfamily \#include $<$Tcp\+Connection\+Input\+Stream.\+hpp$>$}

Inheritance diagram for dev\+:\+:net\+:\+:Tcp\+Connection\+Input\+Stream\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classdev_1_1net_1_1_tcp_connection_input_stream}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_a5101310da0c93c5aa9c03377fa3b252f}{}typedef \hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream}{Tcp\+Connection\+Input\+Stream} {\bfseries self}\label{classdev_1_1net_1_1_tcp_connection_input_stream_a5101310da0c93c5aa9c03377fa3b252f}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_ad081a3f28b123cbf4706e5a60deacc12}{}{\bfseries Tcp\+Connection\+Input\+Stream} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} \&sock, size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_stream_a3ae773ddc1f353c00cebf98eb1a9d19e}{size}=1024 $\ast$32)\label{classdev_1_1net_1_1_tcp_connection_input_stream_ad081a3f28b123cbf4706e5a60deacc12}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_a69049ed0fde934babb903c4383bb1e19}{}{\bfseries Tcp\+Connection\+Input\+Stream} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} \&sock, boost\+::shared\+\_\+array$<$ char $>$ buff, size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_stream_a3ae773ddc1f353c00cebf98eb1a9d19e}{size}=1024 $\ast$32)\label{classdev_1_1net_1_1_tcp_connection_input_stream_a69049ed0fde934babb903c4383bb1e19}

\item 
ssize\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream_afd3cc5a82c38957358887f630c669f2f}{fill} (void)
\begin{DoxyCompactList}\small\item\em 从套接字读取数据填充流缓存 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream_ac1b0b2a1465f9a25d27f0b6422de49f4}{read} (char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 从流中读取数据 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream_ad8808e6abf02d0207abdf534a7136808}{peek} (char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 从流中取出数据，不会把数据从流中删除 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_a057f6beacac44483cb812e04239636cc}{}{\footnotesize template$<$typename T $>$ }\\\hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream}{self} \& \hyperlink{classdev_1_1net_1_1_tcp_connection_input_stream_a057f6beacac44483cb812e04239636cc}{operator$>$$>$} (T \&x)\label{classdev_1_1net_1_1_tcp_connection_input_stream_a057f6beacac44483cb812e04239636cc}

\begin{DoxyCompactList}\small\item\em $>$$>$运算符重载,读到基础类型时请先判断长度是否匹配 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Tcp连接输入流 

\subsection{Member Function Documentation}
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_afd3cc5a82c38957358887f630c669f2f}{}\index{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}!fill@{fill}}
\index{fill@{fill}!dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}}
\subsubsection[{fill(void)}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t Tcp\+Connection\+Input\+Stream\+::fill (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classdev_1_1net_1_1_tcp_connection_input_stream_afd3cc5a82c38957358887f630c669f2f}


从套接字读取数据填充流缓存 

\begin{DoxyReturn}{Returns}
成功返回从套接字读取的字节数,失败返回\+S\+O\+C\+K\+E\+T\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_ad8808e6abf02d0207abdf534a7136808}{}\index{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}!peek@{peek}}
\index{peek@{peek}!dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}}
\subsubsection[{peek(char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t dev\+::net\+::\+Tcp\+Connection\+Input\+Stream\+::peek (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classdev_1_1net_1_1_tcp_connection_input_stream_ad8808e6abf02d0207abdf534a7136808}


从流中取出数据，不会把数据从流中删除 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 缓存大小 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
取到的数据长度 
\end{DoxyReturn}
\hypertarget{classdev_1_1net_1_1_tcp_connection_input_stream_ac1b0b2a1465f9a25d27f0b6422de49f4}{}\index{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}!read@{read}}
\index{read@{read}!dev\+::net\+::\+Tcp\+Connection\+Input\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Input\+Stream}}
\subsubsection[{read(char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t dev\+::net\+::\+Tcp\+Connection\+Input\+Stream\+::read (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classdev_1_1net_1_1_tcp_connection_input_stream_ac1b0b2a1465f9a25d27f0b6422de49f4}


从流中读取数据 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 缓存大小 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
读到的数据长度 
\end{DoxyReturn}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
dev/dev/net/Tcp\+Connection\+Input\+Stream.\+hpp\item 
dev/src/net/Tcp\+Connection\+Input\+Stream.\+cpp\end{DoxyCompactItemize}
